package com.BlogPark.service.UserService.Impl;

import com.BlogPark.mapper.UserMapper;
import com.BlogPark.pojo.DetailsUser;
import com.BlogPark.service.UserService.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    //根据用户id返回用户名称
    @Override
    public DetailsUser searchById(Integer userId) {
        DetailsUser detailsUser = userMapper.searchById(userId);
        return detailsUser;
    }
}
